package com.seventhdawn.gwt.rpc.scripttag.client;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * Response handler for JSONP requests.
 * 
 * @see ScriptTagRequestInvoker
 * @author vojtech.szocs
 * @author Artem Kozarezov
 */
public interface ScriptTagResponseHandler {

    /**
     * Called when a JSONP request completes normally.
     * 
     * @param json The JavaScript object (JSON) returned from the server.
     */
    void onCompletion(JavaScriptObject json);

    /**
     * Called when a JSONP request times out.
     */
    void onTimeout();

}
